package com.lzhsite.technology.designPattern.mediator.ComputerDemo;
/**
 * 期望实现的效果：驱动执行完之后执行cpu,cpu执行完之后执行声音和音频
 * @author lzhcode
 *
 */
public class ClientForComputerDemo
{
    public static void main(String[] args)
    {
        MainBoard mainBoard = new MainBoard();
        CDDriver cdDriver = new CDDriver(mainBoard);
        CPU cpu = new CPU(mainBoard);
        VideoCard videoCard = new VideoCard(mainBoard);
        SoundCard soundCard = new SoundCard(mainBoard);
        mainBoard.setCdDriver(cdDriver);
        mainBoard.setCpu(cpu);
        mainBoard.setVideoCard(videoCard);
        mainBoard.setSoundCard(soundCard);
        cdDriver.readCD();
    }
}
